package org.lds.scheduled.job.admin.business.app.model.request;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.StringUtils;
import org.lds.scheduled.job.common.model.db.request.BaseCreateRequest;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * 新建 - 请求
 *
 * @author lidongsheng
 * @since 2025-01-16
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Accessors(chain = true)
public class AppBaseCreateRequest extends BaseCreateRequest implements Serializable {
    private static final long serialVersionUID = 1L;


    /**
     * 名称
     */
    @NotBlank(message = "name不能为空")
    private String name;

    public void setName(String name) {
        this.name = StringUtils.trimToNull(name);
    }

}
